{{- if .Site.Params.enableDarkMode -}}
    {{- $hide := or (and $.IsHome $.Site.Params.hideThemeToggleInHome) (and (not $.IsHome) $.Site.Params.hideThemeToggle) -}}
    {{- if not $hide -}}
        <button id="theme-switcher" type="button" aria-label="{{ i18n "themeSwitcher" }}">
            {{- partial "utils/icon.html" (dict "$" $ "name" "sun" "class" "theme-icon-light") -}}
            {{- partial "utils/icon.html" (dict "$" $ "name" "moon" "class" "theme-icon-dark") -}}
            {{- partial "utils/icon.html" (dict "$" $ "name" "desktop" "class" "theme-icon-system") -}}
        </button>
    {{- end -}}
{{- end -}}
